home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disc 12
/
Commodore_Disc_12_19xx_-_de.d64
/
Star NL 10
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
10KB
|
331 lines
10 rem ********************************
15 rem * c-64 1541 star nl 10 *
20 rem * menuekalkulation v 1.6 *
25 rem * *
30 rem * (c) 1987 by charly braun *
35 rem * 2400 luebeck 1 *
40 rem ********************************
45 ifw=0thenw=1:load"([195])1987 [195]h.[194]raun",8,1
50 goto80
60 ifei(s)=xorgp(s)=xorpe(s)=xthenkb=y:ka(s)=0:return
65 return
70 poke214,z:poke211,a:sys58732:return
80 v=23:u=24:q=30:qa=10:ru=0:ta=1:da=0:cl=0:kg=0:w=0:mu$="":w$="":x=0:y=1:r=18
90 poke53272,v:poke53280,x:poke53281,x:poke808,254:poke657,128:a1=0:i=10:z=0
95 j=100:k=1000:l=10000:g=20:h=.5:m=13:n=21:n1=0:a1$="":ww=0
100 dim zu$(q),gp(q),ei(q),pe(q),p(q),pr(q),ae(q),mt(q),ka(q),ev(q),mv(q),wm(q)
110 dim wp(q),wg(q),u1(q),ba$(qa),ba(qa)
120 sys58692
130 poke646,7:a=x:z=x:gosub70:print" [205] e n u e k a l c u l a t i o n [214] 1.6 "
135 a=x:z=17:gosub70:print"[183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
140 ifmu$<>""then a=19-(len(mu$)/2):z=3:gosub70:print" ";mu$;" "
145 ifda=1then152
150 a=y:z=5:gosub70:print"1 [197]ingabe":goto200
152 a=v:z=r:gosub70:print"f2 [196]ruckerausgabe"
154 z=g:gosub70:print"f4 [197]ingabe neu"
156 a=v:z=22:gosub70:print"f6 [206]ame aendern"
160 a=y:z=5:gosub70:print"1 [193]usgabe / aendern / erweitern
170 z[178]7:[141]70:[153]"2 (NULL)eberblick"
180 z[178]9:[141]70:[153]"3 peekesondere atnusgaben
190 a=y:z=11:gosub70:print"4 speichern
200 a[178]y:z[178]m:[141]70:[153]"5 laden "
210 a[178]x:z[178]22:[141]70:[153]"f5 (NULL)eilnehmer open"ta"cmdsys "
220 a[178]x:z[178]g:[141]70:[153]"f3 (NULL)undung":[139]ru[178]x[167]a[178]m:[141]70:[153]" aus "
230 [139]ru[178]y[167]a[178]m:[141]70:[153]" ein "
240 a[178]x:z[178]r:[141]70:[153]"f1 right$nhalt str$iskette"
260 a[178]y:z[178]15:[141]70:[153]"0 beenden
280 z=u:gosub480:sys65499
290 a=i:z=u:gosub70:print" < [212]aste >";:forw=xto160:next
293 a=i:z=u:gosub70:print" < [212]aste [146]>";:forw=xto120:next
296 a=i:z=u:gosub70:print" <[146] [212]aste >[146]";:forw=xto120:next
298 ifpeek(646)>xandti$>"000130"thensys65499:gosub450
300 getw$:ifw$=""then290
305 sys65499:ifpeek(646)=xthen120
310 ifw$=" "thengosub450:goto300
320 ifw$="[133]"goto570
330 ifw$="[134]"thenz=u:gosub480:goto590
340 ifw$="[135]"goto490
350 ifw$="[137]"goto5000
360 ifw$="[138]"thenz=u:gosub480:goto610
370 ifw$="[139]"thenz=u:gosub480:goto420
375 ifw$="[146]"thenpoke808,237
380 ifw$<"0"orw$>"5"goto470
390 w=val(w$):ifw=0thenz=u:gosub480:goto510
400 onwgoto1000,700,1500,1700,1900
410 goto300
420 ifmu$=""then470
430 a=x:z=v:gosub70:print"[159][206]euer [205]enuename ";mu$;:a=16:gosub70:inputmu$
440 z=3:gosub480:z=v:gosub480:goto130
450 poke646,x:sys58692:return
470 a=i:z=u:gosub70:print"[198]ehlbedienung[158]";:forw=0to1e3:next:goto280
480 poke781,z:sys59903:return
490 z=u:gosub480:a=g:z=22:gosub70:print" ";
495 a=13:z=22:gosub70:inputta
496 ifta>32500thena=m:z=24:gosub70:print"zu gross";:forw=xtok:next:gosub480:goto495
497 ta%=ta:ta=ta%:ifta<1thenta=y
500 goto145
510 a=i:z=u:gosub70:print"beenden[146] wirklich ?";:forw=1to50:next
520 a=i:z=u:gosub70:print"beenden wirklich[146] ?";:forw=1to50:next
530 getw$:ifw$=""goto510
540 ifw$="j"orw$="w"orw$="b"thensys58253:end
550 ifw$="n"goto210
560 goto530
570 sys49152:goto120
580 ifpeek(646)=xthenreturn
581 a=x:z=u:gosub70:print"[151]a[146][155]=aendern - [151]e[146][155]=ende - [151][195]ursor[146][155]=blaettern[158]";
582 forw=xto50:next
585 a=x:z=u:gosub70:print"[155]a=aendern - e=ende - [195]ursor=blaettern[158]";
587 forw=xto50:next:return
590 ifru=xthenru=y:a=m:z=g:gosub70:print" ein [146]":goto280
600 ifru=ythenru=x:a=m:z=g:gosub70:print" aus [146]":goto280
610 ifmu$<>""thena=x:z=u:gosub70:print"[211]peicher loeschen j/n [158]";:goto630
620 goto470
630 getw$:ifw$=""then630
640 ifw$="j"thengosub670:cl=0:forz=22to2step-1:gosub480:next:goto130
650 ifw$="n"then280
660 goto630
670 a=x:z=u:gosub70:print" [201]ch loesche [196]ir den [211]peicher";
680 fors=ytoq:zu$(s)="":gp(s)=x:ei(s)=x:pe(s)=x:p(s)=x:ka(s)=x:ev(s)=x:next
690 fors=ytoqa:ba$(s)="":ba(s)=x:next:mu$="":ab=x:da=x:ru=x:ta=y:return
700 ifmu$=""goto470
720 sys58692:kb=x:w=x:ob=x
730 printtab(i)"[150]";mu$:s1=x:s2=x:s3=x
740 printtab(20)"[199]ew. [196][205][158]"
750 fors=ytoq:ifgp(s)=xandei(s)=xandpe(s)=xthennext:goto890
760 gosub60:ifkb=ythenob=y:kb=x:goto990
790 gosub3200:gosub3100
850 a=x:z=w+y:gosub70:printzu$(s);:a=r:gosub70
860 a1=gp(s):gosub2100:printa1$;a1,
870 a1=p(s) :gosub2100:printa1$;a1:s1=s1+p(s)
880 next
890 fors=ytoqa:ifba(s)=xthennext:goto910
895 gosub3100
900 a=x:z=w+y:gosub70:print"[159]";ba$(s);tab(30);:gosub2100
905 a1=ba(s):gosub2100:printa1$;a1:s3=s3+ba(s):next
910 ifob=-1then960
920 a=x:z=v:gosub70:print"[158]pro [208]erson"s1"[196][205] [159] [194]es. [193]usg."s3;
930 kg=x:forw=ytoq:kg=kg+(ae(w)*pe(w)):next:kg=int(kg*j+h)/j
940 a=x:z=u:gosub70:print"[153]"ta"x ca."kg"[196][205]";
950 kt=kg/ta:kt=int(kt*j+h)/j
955 ifkt>s1then:a=30:z=u:gosub70:print ""kt"[158]";
956 ifkt<s1then:a=30:z=u:gosub70:print "[150]"kt"[158]";
960 getw$:ifw$=""then960
970 ifw$=" "thens=y:goto120
980 goto960
990 printzu$(s)"[155] [194]erechnung unmoeglich[158]":kb=0:w=w+1:goto880
1000 sys58692:ifmu$<>""then1030
1010 a=x:z=12:gosub70:input"[206]ame der [218]ubereitung";mu$:ifmu$=""then1010
1030 sys58692:ww=s:ifda=xors>qthens=y:ww=y
1040 poke646,y:a=g-(len(mu$)/2):z=x:gosub70:print" "mu$
1050 a=7:z=3:gosub70:print"[197]ssen [212]eilnehmer "ta"[208]ers.[158]"
1060 a=x:z=5:gosub70:print"[158]"s"[157]. [218]utat "tab(22)zu$(s);" "
1070 a=x:z=7:gosub70:print"[199]ramm pro [208]erson "gp(s);"[157] "
1080 a=x:z=9:gosub70:print"[199]ewicht pro [197]inheit "ei(s)"[157] "
1090 z=11:gosub70:print"[208]reis pro [197]inheit "pe(s)"[157] "
1100 z=m:gosub70:print"[150][214]orhandene "ev(s)"[157] "
1110 z=15:gosub70:print"[155][194]enoetigte [205]enge "
1120 z=17:gosub70:print"[155][193]usgabeeinheiten "
1130 z=g:gosub70:print"[153][208]reis pro [208]erson "
1140 ifta>ythena=x:z=22:gosub70:print"[153][203]osten pro [193]usgabe "
1150 gosub60:ifkb=ythena=21:z=g:gosub70:print"[198]ehlende [196]aten":kb=x:goto1300
1160 gosub3200
1170 ifp(s)=xthen1380
1180 ifru=1thena=30:z=7:gosub70:print"[154]";wm(s)
1190 a=n:z=g:gosub70:print"[153]"p(s)"[157] ";
1195 ifru=1thena=30:z=g:gosub70:print"[154]"wp(s)"[157] ";
1200 a=n:z=15:gosub70:print"[155]"mv(s)"[157] "
1205 ifru=ythena=30:gosub70:print"[154]"wg(s)"[157] "
1210 ifev(s)>xthena=30:z=13:gosub70:print"[150]" mt(s)"[157] ";
1220 n1=n:ifru=ythenn1=30
1230 a=n1:z=17:gosub70:print"[155]"ae(s)"[157] "
1240 kg=x:forww=ytoq
1250 kg=kg+ka(ww):next:po=kg/ta
1260 kg=int(kg*j+h)/j:a=4:z=2:gosub70:print"[154]"kg"[157] [196][205] "
1270 po=int(po*j+h)/j
1280 a=20:z=2:gosub70:print"[208]ort."po"[157] [196][205] ";
1290 n1=n:ifru=ythenn1=30
1295 ifta>ythena=n1:z=22:gosub70:print"[153]"ka(s)"[157] "
1300 ifda=ygoto1380
1310 z=u:gosub480
1315 zu$(s)="":a=g:z=5:gosub70:input"[158]";zu$(s):gosub1370
1320 gp(s)=0:z=7:gosub70:inputgp(s):gosub1370
1325 ei(s)=0:z=9:gosub70:inputei(s):gosub1370
1330 pe(s)=0:z=11:gosub70:inputpe(s):gosub1370
1335 z=m:gosub70:input"[150]";ev(s):gosub1370
1340 ifgp(s)=0thenmv(s)=0:z=15:gosub70:input"[155]";mv(s):gosub1370:gp(s)=mv(s)/ta
1350 ifmv(s)=0andgp(s)=0thenz=17:gosub70:inputae(s):gosub1370:gp(s)=ae(s)*ei(s)/ta
1360 gp(s)=int(gp(s)*k+h)/k:da=y:cl=y:goto1060
1370 a=g:gosub70:print" ":return
1380 sys65499:goto1390
1382 gosub580
1385 ifpeek(646)>xandti$>"000130"thensys65499:gosub450
1390 getw$:ifw$=""then1382
1392 sys65499:ifpeek(646)=xthen1030
1393 ifw$=" "thengosub450:goto1390
1395 ifw$=chr$(29)thens=s+y:goto1440
1400 ifw$=chr$(17)thens=s-y:goto1440
1410 ifw$="a"thengosub1470:goto1310
1420 ifw$="e"goto120
1430 goto1390
1440 ifs<ythens=q
1450 ifs>qthens=y
1460 goto1060
1470 z=7:gosub70:print"[199]ramm pro [208]erson "gp(s);"[157] "
1475 a=30:z=13:gosub70:print" ";
1480 a=30:z=15:gosub70:print" ";
1485 a=30:z=17:gosub70:print" ";
1490 return
1500 ifmu$=""goto470
1510 s=y:sys58692
1515 a=i:z=x:gosub70:print"[194]esondere [193]usgaben
1520 a[178]19[171]([195](mu$)[173]2):z[178]3:[141]70:[153]" ";mu$;" "
1530 a[178]x:z[178]5:[141]70:[153]s"cmd. atnusgabe "
1540 z[178]7:[141]70:[153]"(NULL)umme
1550 a=g:z=5:gosub70:printba$(s);" "
1560 z=7:gosub70:printba(s)"[157] "
1570 getw$:ifw$=""thengosub580
1580 ifw$=chr$(17)thens=s-y:goto1670
1590 ifw$=chr$(29)thens=s+y:goto1670
1600 ifw$="a"goto1625
1610 ifw$="e"thens=y:goto120
1620 goto1570
1625 z=24:gosub480
1630 ba$(s)="":a=r:z=5:gosub70:inputba$(s)
1640 gosub70:print" "
1650 ba(s)=0:a=r:z=7:gosub70:inputba(s)
1655 gosub70:print" "
1660 goto1530
1670 ifs<ythens=qa
1680 ifs>qathens=y
1690 goto1530
1700 ifzu$(1)=""goto470
1705 a=3:z=11:gosub70:print"speichern
1710 z[178]u:[141]70:[153]"wirklich speichern j/n";:[161]w$:[139]w$[178]""[167]1710
1715 [139]w$[178]"j"[167]z[178]u:[141]480:[137]1720
1717 [139]w$[178]"n"[137]190
1719 [137]1710
1720 ii[178][198](mu$):ii[178]ii[171]128:[139]ii[179]65[167]ii[178]ii[170]128
1725 ii$[178][199](ii)[170][202](mu$,2,15)
1730 z[178]u:[141]70:[153]"speichere "ii$;
1740 [159]1,8,15,"s:"[170]ii$
1750 [160]1:[159]1,8,2,ii$[170]",s,w
1760 print#1,mu$
1770 print#1,ta
1780 print#1,ru
1790 fors=1toq:ifzu$(s)=""thenzu$=chr$(32)
1800 print#1,zu$(s)
1810 print#1,gp(s)
1820 print#1,ei(s)
1830 print#1,pe(s)
1835 print#1,ev(s):next
1840 fors=ytoqa:ifba$(s)=""thenba$(s)=chr$(32)
1850 print#1,ba$(s)
1860 print#1,ba(s)
1865 next:s=y
1870 close1:goto130
1900 a=3:z=m:gosub70:print"[158]laden":z=u:gosub480
1905 mv$="":a=y:z=v:gosub70:input"[215]elche [211]peise bitte";mv$
1910 ifmv$=""thenz=v:gosub480:goto130
1920 gosub480
1930 open1,8,2,mv$+"*,s,r
1940 [159]8,8,15:[132]8,b,b$,c,d:[139]b[178]0[167]1960
1950 a[178]x:z[178]u:[141]70:[153]b" "b$" "c" "d;:[129]w[178]0[164]2e3:[130]:[160]8:[160]1:[137]130
1960 [139]da[178]1[167][141]670
1970 [141]480
1980 [132]1,mu$
1985 z[178]3:[141]480:a[178]19[171]([195](mu$)[173]2):[141]70:[153]" ";mu$;" "
1990 [132]1,ta
1995 [132]1,ru
2000 [129]s[178]1[164]q
2010 [132]1,zu$(s)
2020 [132]1,gp(s)
2030 [132]1,ei(s)
2040 [132]1,pe(s)
2045 [132]1,ev(s)
2050 [130]:a[178]19[171]([195](mu$)[173]2):z[178]3:[141]70:[153]"print ";mu$;" "
2060 [129]s[178]1[164]qa
2070 [132]1,ba$(s):[139]ba$[178]""[167]ba$[178]" "
2080 [132]1,ba(s)
2085 [130]
2090 da[178]y:s[178]y:[160]8:[160]1:[137]130
2100 [139]a1[179]y[167]a1$[178]" ":[142]
2110 [139]a1[179]i[167]a1$[178]" ":[142]
2120 [139]a1[179]j[167]a1$[178]" ":[142]
2130 [139]a1[179]k[167]a1$[178]"":[142]
2150 [142]
2180 [139]gp(s)[179]k[137]2930
2200 [139]a1[179][171]y[167][152]4,"";:[142]
2210 [139]a1[179]y[167][152]4," ";:[142]
2220 [139]a1[179]i[167][152]4," ";:[142]
2230 [139]a1[179]j[167][152]4," ";:[142]
2240 [139]a1[179]k[167][152]4," ";:[142]
2250 [139]a1[179]l[167][152]4," ";:[142]
2260 [139]a1[179]100000[167][152]4,"";:[142]
2270 [142]
3100 w[178]w[170]y:[139]w[177]n[167]a[178]5:z[178]u:[141]70:[153]"peekitte < (NULL)(NULL)atnlenval > druecken"
3110 [139]w[177]n[167][151]198,x:[146]198,y:w[178][171]1:[151]198,x:[158]58692:[142]
3120 [139]ob[178]y[167]a[178]5:z[178]u:[141]70:[153]"peekitte < (NULL)(NULL)atnlenval > druecken":ob[178][171]1
3150 [142]
3200 p(s)[178]pe(s)[173]ei(s)[172]gp(s):[139]ru[178]y[167]p(s)[178][181]((p(s))[172]j[170]h)[173]j
3210 [139]ru[178]x[167]p(s)[178][181]((p(s))[172]j[170]h)[173]j:[139]p(s)[179].01[167]p(s)[178].01
3220 mv(s)[178]gp(s)[172]ta:mv(s)[178][181](mv(s)[172]i[170]h)[173]i:mt(s)[178]mv(s)[171]ev(s)
3230 ae(s)[178]mt(s)[173]ei(s):[139]ru[178]y[167]ae(s)[178][181](ae(s)[170]h)
3235 [139]ru[178]y[175]ae(s)[179]y[175]ev(s)[178]x[167]ae(s)[178]y
3237 [139]ae(s)[179]x[167]ae(s)[178]x
3240 ae(s)[178][181](ae(s)[172]i[170]h)[173]i:ka(s)[178]ae(s)[172]pe(s): ka(s)[178][181](ka(s)[172]j[170].55)[173]j
3250 wm(s)[178]ae(s)[173]ta[172]ei(s):wp(s)[178]pe(s)[173]ei(s)[172]wm(s)
3255 wp(s)[178][181](wp(s)[172]j[170]h)[173]j
3260 [139]ru[178]y[167]wm(s)[178][181](wm(s)[172]j[170]h)[173]j
3270 wg(s)[178]ei(s)[172]ae(s)
3280 gp(s)[178][181](gp(s)[172]k[170]h)[173]k
3290 [142]
5000 [139]mu$[178]""[167]z[178]r:[141]480:[137]470
5010 a[178]26:z[178]r:[141]70:[153]"sysstr$ruckerausgabe":ab[178]x:ob[178]x:s3[178]x
5020 z[178]24:[141]480:a[178]7:[141]70:[153]"right$ch drucke deine str$aten!"
5060 [159]1,4:[152]1,[199](27);[199](93);[199](48);[199](27);[199](33);[199](1);
5070 [160]1:[159]4,4,7:su[178]0:s3[178]0
5080 [129]s[178]1[164]q:[139]gp(s)[178]0[175]ei(s)[178]0[175]pe(s)[178]0[167]:[130]:[137]5120
5090 [141]60:[139]kb[178]1[167]:[130]:[137]5120
5100 [141]3200
5110 su[178]su[170]p(s):[130]
5120 [152]4,[199](27);[199](104);[199](2);[163]2);mu$;[199](27);[199](104);[199](0)
5130 [139]kb[178]1[167][152]4,"chr$esamtpreis noch nicht errechenbar":[137]5150
5140 [152]4,[163]10)"chr$esamtpreis ca."su "str$(NULL)";
5150 [139]ta[177]1[167][152]4," (NULL)eilnehmer "ta
5160 [152]4:kb[178]0
5165 [152]4,[199](27);[199](33);[199](4);[163]5);
5170 [152]4,"peekezeichnung chr$ew. (NULL)ort. chr$ebinde (NULL)rei";
5180 [152]4,"s je chr$ebinde (NULL)enge atnusgabe chr$esamtpreis in str$(NULL)"
5190 [129]s[178]1[164]134:[152]4,"tan";:[130]:[152]4," "
5200 [129]s[178]1[164]q:[139]gp(s)[178]0[175]ei(s)[178]0[175]pe(s)[178]0[167]:[130]:[137]5460
5210 [141]60:[139]kb[178]1[137]5340
5240 [141]3200
5300 ab[178]ab[170]ka(s)
5310 [152]4,[199](27);[199](93);[199](49);
5320 [152]4,[199](27);[199](68);[199](23);[199](35);[199](39);[199](49);[199](65);
5330 [152]4,[199](86);[199](99);[199](120);[199](0);
5340 [152]4,[163]5);zu$(s);[199](9);:a1[178]gp(s):[141]2200
5350 [139]kb[178]1[167][152]4,"peekerechnung noch nicht moeglich":kb[178]0:ob[178]1:[130]:[137]5460
5360 [152]4,gp(s);[199](9);:a1[178]p(s):[141]2200
5370 [152]4,p(s);[199](9);:a1[178]ei(s):[141]2200
5380 [152]4,ei(s);[199](9);:a1[178]pe(s):[141]2200
5400 [152]4,pe(s);:[139]ta[179]2[167][152]4,"":[130]
5410 [152]4,[199](9);:a1[178]mt(s):[141]2200
5420 [152]4,mt(s);[199](9);:a1[178]ae(s):[141]2200
5430 [152]4,ae(s);[199](9);:a1[178]ka(s):[141]2200
5440 [152]4,ka(s)
5450 [130]
5460 [139]ob[178]1[176]ta[179]2[167]5500
5470 [152]4,[163]120)"tantantantantantantantantantantantantan":a1[178]ab:[141]2200
5480 [152]4,[163]120)ab
5490 [152]4,[163]120)"============="
5500 [152]4:[152]4
5510 [129]s[178]1[164]qa:[139]ba(s)[178]0[167][130]:[137]5530
5520 [152]4,[163]i);ba$(s);[163]50[171][195](ba$(s)));ba(s) :s3[178]s3[170]ba(s):[130]
5530 [139]s3[177]0[167][152]4,[163]50);s3"str$(NULL)"[163]40)s3[170]ab" str$(NULL) valndsumme
5540 as=(ab+s3)/ta:as=int(as*j+h)/j
5544 print#4,chr$(27);chr$(33);chr$(10);chr$(27)chr$(93);chr$(48);
5545 print#4,tab(i)"[208]reis pro [208]erson "as"[196][205]
5550 [152]4:[152]4
5560 [160]4:s[178]1:[151]198,0:[137]152